<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/jsp/pages/include/global.jsp" %>

<c:set target="${self}" property="title">系统角色管理</c:set>

<c:set target="${self.css}" property="plugins">
<link href="${self.path.metronic}/assets/global/plugins/jstree/dist/themes/default/style.min.css" rel="stylesheet" type="text/css" />
<link href="${self.path.metronic}/assets/global/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css" />
<link href="${self.path.metronic}/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" type="text/css" />
<link href="${self.path.metronic}/assets/global/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
<link href="${self.path.metronic}/assets/global/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
</c:set>

<c:set target="${self.js}" property="plugins">
<script src="${self.path.metronic}/assets/global/plugins/jstree/dist/jstree.min.js" type="text/javascript"></script>
<script src="${self.path.metronic}/assets/global/scripts/datatable.js" type="text/javascript"></script>
<script src="${self.path.metronic}/assets/global/plugins/datatables/datatables.min.js" type="text/javascript"></script>
<script src="${self.path.metronic}/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js" type="text/javascript"></script>
<script src="${self.path.metronic}/assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
</c:set>

<c:set target="${self.css}" property="main">

</c:set>

<c:set target="${self.js}" property="main">
<script src="${self.path.resources}/console/js/role.js" type="text/javascript"></script>
</c:set>

<c:set target="${self.content}" property="main">
 <input type="hidden" name="selectRoleId"/>
 <div class="row">
    <div class="col-md-6">
		<div class="portlet light">
	         <div class="portlet-title">
	             <div class="caption">
	                 <i class="fa fa-user-secret"></i>角色列表</div>
	             <div class="actions">
	                 <a href="javascript:;" class="btn btn-default btn-sm addRole">
	                     <i class="fa fa-plus"></i> 新增角色 </a>
	             </div>
	         </div>
	         <div class="portlet-body">
	             <table class="table table-striped table-bordered table-hover table-checkable order-column" id="role_table">
	                 <thead>
	                     <tr>
	                         <th> 角色标识 </th>
	                         <th> 角色名称 </th>
	                         <th> 操作</th>
	                     </tr>
	                 </thead>
	                 <tbody>
	                     
	                 </tbody>
	             </table>
	         </div>
	     </div>
	
	</div>
	
	<div class="col-md-6">
		<div class="portlet light">
	         <div class="portlet-title">
	             <div class="caption">
	                 <i class="fa fa-user"></i>角色<span id="selectRoleName"></span>对象列表</div>
	             <div class="actions">
	                 <a href="javascript:;" class="btn btn-default btn-sm selectRoleUser disabled">
	                     <i class="fa fa-plus"></i> 选择角色用户 </a>
	                 <a href="javascript:;" class="btn btn-default btn-sm selectRoleOrg disabled">
	                     <i class="fa fa-plus"></i> 选择角色机构 </a>
	             </div>
	         </div>
	         <div class="portlet-body">
	             <table class="table table-striped table-bordered table-hover table-checkable order-column" id="role_obj_table">
	                 <thead>
	                     <tr>
	                         <th> 对象类型 </th>
	                         <th> 对象名称 </th>
	                         <th> 操作</th>
	                     </tr>
	                 </thead>
	                 <tbody>
	                     
	                 </tbody>
	             </table>
	         </div>
	     </div>
	
	</div>
</div>

<div class="modal fade bs-modal-lg" id="roleAddDialog" tabindex="-1" role="dialog" aria-hidden="false">
	<div class="modal-dialog">
	    <div class="modal-content" id="roleAddDialogContent">
	        <div class="modal-header">
	            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	            <h4 class="modal-title">角色定义</h4>
	        </div>
	        <div class="modal-body">
	        	<form action="#" class="form-horizontal" id="roleForm">
				    <div class="form-body">
				        <div class="form-group">
				            <label class="col-md-3 control-label">角色标识</label>
				            <div class="col-md-8">
				                <input type="text" class="form-control" placeholder="角色标识" name="roleKey">
				            </div>
				        </div>
				        <div class="form-group">
				            <label class="col-md-3 control-label">角色名称</label>
				            <div class="col-md-8">
				                <input type="text" class="form-control" placeholder="角色名称" name="roleName">
				            </div>
				        </div>
				    </div>
				</form>
	        </div>
	        <div class="modal-footer">
	            <button type="button" class="btn green ok">保存</button>
	            <button type="button" class="btn dark btn-outline" data-dismiss="modal">关闭</button>
	        </div>
	    </div>
	    <!-- /.modal-content -->
	</div>
<!-- /.modal-dialog -->
</div>

<div class="modal fade bs-modal-lg" id="roleEditDialog" tabindex="-1" role="dialog" aria-hidden="false">
	<div class="modal-dialog">
	    <div class="modal-content" id="roleEditDialogContent">
	        <div class="modal-header">
	            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	            <h4 class="modal-title">角色定义</h4>
	        </div>
	        <div class="modal-body">
	        	<form action="#" class="form-horizontal" id="roleEditForm">
	        		<input type="hidden" class="form-control" name="roleId">
				    <div class="form-body">
				        <div class="form-group">
				            <label class="col-md-3 control-label">角色标识</label>
				            <div class="col-md-8">
				                <input type="text" class="form-control" placeholder="角色标识" name="roleKey">
				            </div>
				        </div>
				        <div class="form-group">
				            <label class="col-md-3 control-label">角色名称</label>
				            <div class="col-md-8">
				                <input type="text" class="form-control" placeholder="角色名称" name="roleName">
				            </div>
				        </div>
				    </div>
				</form>
	        </div>
	        <div class="modal-footer">
	            <button type="button" class="btn green ok">保存</button>
	            <button type="button" class="btn dark btn-outline" data-dismiss="modal">关闭</button>
	        </div>
	    </div>
	    <!-- /.modal-content -->
	</div>
<!-- /.modal-dialog -->
</div>


<div class="modal fade bs-modal-lg" id="orgSelectDialog" tabindex="-1" role="dialog" aria-hidden="false">
	<div class="modal-dialog">
	    <div class="modal-content">
	        <div class="modal-header">
	            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	            <h4 class="modal-title">选择角色机构</h4>
	        </div>
	        <div class="modal-body">
	        	<div id="orgSelectTree">
	        		这里是机构树的
	        	</div>
	        </div>
	        <div class="modal-footer">
	            <button type="button" class="btn green ok">确定</button>
	            <button type="button" class="btn dark btn-outline" data-dismiss="modal">关闭</button>
	        </div>
	    </div>
	    <!-- /.modal-content -->
	</div>
<!-- /.modal-dialog -->
</div>

<div class="modal fade bs-modal-lg" id="userSelectDialog" tabindex="-1" role="dialog" aria-hidden="false">
	<div class="modal-dialog">
	    <div class="modal-content">
	        <div class="modal-header">
	            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	            <h4 class="modal-title">选择角色用户</h4>
	        </div>
	        <div class="modal-body">
	        	<div id="userSelectTree"></div>
	        </div>
	        <div class="modal-footer">
	            <button type="button" class="btn green ok">确定</button>
	            <button type="button" class="btn dark btn-outline" data-dismiss="modal">关闭</button>
	        </div>
	    </div>
	    <!-- /.modal-content -->
	</div>
<!-- /.modal-dialog -->
</div>


</c:set>

<%@ include file="/WEB-INF/views/jsp/pages/include/main.jsp"%>